﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class EmailAllText : MonoBehaviour
{

    public UILabel allText;
    public UILabel timetext;
    private GameObject scrollView;
    public GameObject returnBtn;

    void Awake()
    {
        UIEventListener.Get(returnBtn).onClick = ButtonClick;
    }

    void ButtonClick(GameObject button)
    {
        if(button.name == "CloseBtn"){
            Destroy(gameObject);
            scrollView.SetActive(true);
        }
    }

    public void LoadMsg(GameObject go, string str, string time)
    {
        scrollView = go;
        allText.text = "[e76505]" + str;
        timetext.text = "[e76505]" + time;
    }
    public void BtnDestory()
    {
        Destroy(gameObject);
        scrollView.SetActive(true);
    }
}
